package cn.explink.dop.entity.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import cn.explink.distributor.framework.CommonCondition;

@Entity
@Table(name = "bd_condition")
public class ConditionVO extends CommonCondition {

	private static final long serialVersionUID = 8705843400100679894L;

	private int isEnable;

	private String className;

	private DistributeStrategyVO distributeStrategyVO;

	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name = "ID", nullable = false, length = 32)
	@Override
	public String getId() {
		return super.getId();
	}

	@Override
	public void setId(String id) {
		super.setId(id);
	}

	@Override
	public String getName() {
		return super.getName();
	}

	@Override
	public void setName(String name) {
		super.setName(name);
	}

	@Override
	public void setPriority(int priority) {
		super.setPriority(priority);
	}

	@Override
	public int getPriority() {
		return super.getPriority();
	}

	@Override
	public int getWeight() {
		return super.getWeight();
	}

	@Override
	public void setWeight(int weight) {
		super.setWeight(weight);
	}

	@Column(name = "is_enable")
	public int getIsEnable() {
		return this.isEnable;
	}

	public void setIsEnable(int isEnable) {
		this.isEnable = isEnable;
	}

	@Column(name = "class_name")
	public String getClassName() {
		return this.className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "distribute_strategy_id")
	public DistributeStrategyVO getDistributeStrategyVO() {
		return this.distributeStrategyVO;
	}

	public void setDistributeStrategyVO(DistributeStrategyVO distributeStrategyVO) {
		this.distributeStrategyVO = distributeStrategyVO;
	}

}
